﻿<data:WizardUserControl x:Class="ICSharpCode.Data.EDMDesigner.Core.Windows.EDMWizard.ChooseDatabaseConnectionUserControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:data="http://icsharpcode.net/data">
    <Grid Margin="5" x:Name="grdConnection">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <TextBlock Margin="3">Which database connection should your application use?</TextBlock>

        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <ComboBox Margin="3" SelectedItem="{Binding SelectedDatabase}" ItemsSource="{Binding Databases}" SelectionChanged="cboDatabases_SelectionChanged">
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Name}" />
                    </DataTemplate>
                </ComboBox.ItemTemplate>
            </ComboBox>
            <Button Grid.Column="1" Margin="3" Padding="3" Click="btnNewConnection_Click">New Connection...</Button>
        </Grid>

        <TextBlock Grid.Row="2" Margin="3">Entity connection string:</TextBlock>
        <TextBox Grid.Row="3" Margin="3" TextWrapping="WrapWithOverflow" IsReadOnly="True" Text="{Binding EntityConnectionString, Mode=OneWay}" />
    </Grid>
</data:WizardUserControl>
